// https://zm.quya.vip/api/v1/uploadFile
export const upload = async (filePath) => {

	console.log('doupload');
	
	return await new Promise(function(resolve, reject) {
		uni.uploadFile({
			url: 'https://zm.quya.vip/api/v1/uploadFile', //仅为示例，非真实的接口地址
			filePath,
			name: 'file',
			success: (uploadFileRes) => {
				let res = JSON.parse(uploadFileRes.data);
				resolve(res.data.url);
			}
		});

	})
	
}